﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SingletonUnit
{
    /// <summary>
    /// 静态初始化 线程安全，但无锁
    /// </summary>
    public sealed class ThreadSafeNoLockSingleton : BaseSingleton
    {
        private static readonly ThreadSafeNoLockSingleton _instance = new ThreadSafeNoLockSingleton();
        static ThreadSafeNoLockSingleton() { }
        private ThreadSafeNoLockSingleton() { }
        public static ThreadSafeNoLockSingleton Instance
        {
            get { return _instance; }
        }
    }
}
